{
  LX SelTypes module

  Based on modo's SDK lxseltypes.h which is:

  Copyright (c) 2008-2012 Luxology LLC

  Permission is hereby granted, free of charge, to any person obtaining a
  copy of this software and associated documentation files (the "Software"),
  to deal in the Software without restriction, including without limitation
  the rights to use, copy, modify, merge, publish, distribute, sublicense,
  and/or sell copies of the Software, and to permit persons to whom the
  Software is furnished to do so, subject to the following conditions:

  The above copyright notice and this permission notice shall be included in
  all copies or substantial portions of the Software.   Except as contained
  in this notice, the name(s) of the above copyright holders shall not be
  used in advertising or otherwise to promote the sale, use or other dealings
  in this Software without prior written authorization.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  DEALINGS IN THE SOFTWARE.
}

{
  Copyright (c) 2012, David Ballesteros and Jameel Halabi

  This unit is part of the BLAISEmodo wrapper,
  which is licensed under the BSD 2-Clause license (see licenses/license.txt).
}


unit Lx_SelTypes;

{$mode objfpc}{$H+}

interface

uses
  Lx_Result, Lx_Mesh;

const
  LXsSELTYP_SCENE              = 'cinema' ;
  LXsSELTYP_ITEM               = 'item'   ;
  LXsSELTYP_CHANNEL            = 'channel';
  LXsSELTYP_CENTER             = 'center' ;
  LXsSELTYP_PIVOT              = 'pivot'  ;
  LXsSELTYP_LINK               = 'link'   ;
  LXsSELTYP_VERTEX             = 'vertex' ;
  LXsSELTYP_EDGE               = 'edge'   ;
  LXsSELTYP_POLYGON            = 'polygon';
  LXsSELTYP_VERTEXMAP          = 'vmap'   ;

  LXu_SCENEPACKETTRANSLATION   = '{A63F8E08-94D8-11D9-96D3-000A956C2E10}';
  LXu_ITEMPACKETTRANSLATION    = '{029663CC-9571-11D9-B9AD-000A956C2E10}';
  LXu_CHANNELPACKETTRANSLATION = '{00DE9D39-6A83-46DC-9C28-360662922CE5}';
  LXu_CENTERPACKETTRANSLATION  = '{52B10EAB-9EA6-4F28-81D1-2FEC51E02933}';
  LXu_PIVOTPACKETTRANSLATION   = '{9744D68E-D6CD-4652-AD33-073A24E16901}';
  LXu_LINKPACKETTRANSLATION    = '{EEA9F625-EB3C-43FD-A156-C8552D6D18C9}';
  LXu_VERTEXPACKETTRANSLATION  = '{D77B8382-9572-11D9-AFDE-000A956C2E10}';
  LXu_EDGEPACKETTRANSLATION    = '{CA4DFE14-957E-11D9-AC64-000A956C2E10}';
  LXu_POLYGONPACKETTRANSLATION = '{2E0929DC-9583-11D9-B058-000A956C2E10}';
  LXu_VMAPPACKETTRANSLATION    = '{BBCB6B90-9586-11D9-A3B8-000A956C2E10}';

type
  ILxScenePacketTranslation = interface
  [LXu_SCENEPACKETTRANSLATION]
    function Scene (    Packet : Pointer ;
                    out VObj             ) : LxResult;
    function Packet(    Scene_ : IUnknown) : Pointer ;
  end;

  ILxItemPacketTranslation = interface
  [LXu_ITEMPACKETTRANSLATION]
    function Item  (    Packet : Pointer ;
                    out VObj             ) : LxResult;
    function Packet(    Item_  : IUnknown) : Pointer ;
  end;

  ILxChannelPacketTranslation = interface
  [LXu_CHANNELPACKETTRANSLATION]
    function Item  (    Packet : Pointer ;
                    out VObj             ) : LxResult;
    function Index (    Packet : Pointer ) : UInt32  ;
    function Packet(    Item_  : IUnknown;
                        Index_ : UInt32  ) : Pointer ;
  end;

  ILxCenterPacketTranslation = interface
  [LXu_CENTERPACKETTRANSLATION]
    function Item  (    Packet : Pointer ;
                    out VObj             ) : LxResult;
    function Packet(    Item_  : IUnknown) : Pointer ;
  end;

  ILxPivotPacketTranslation = interface
  [LXu_PIVOTPACKETTRANSLATION]
    function Item  (    Packet : Pointer ;
                    out VObj             ) : LxResult;
    function &Type (    Packet : Pointer ) : UInt32  ;
    function Packet(    Item_  : IUnknown;
                        Type_  : UInt32  ) : Pointer ;
  end;

  ILxLinkPacketTranslation = interface
  [LXu_LINKPACKETTRANSLATION]
    function From  (    Packet      : Pointer ;
                        Channel     : PInteger;
                    out VObj                  ) : LxResult;
    function &To   (    Packet      : Pointer ;
                        Channel     : PInteger;
                    out VObj                  ) : LxResult;
    function Packet(    FromItem    : IUnknown;
                        FromChannel : Integer ;
                        ToItem      : IUnknown;
                        ToChannel   : Integer ) : Pointer ;
  end;

  ILxVertexPacketTranslation = interface
  [LXu_VERTEXPACKETTRANSLATION]
    function Vertex (    Packet   : Pointer    ;
                         Vertex   : PLXtPoint  ) : LxResult;
    function Polygon(    Packet   : Pointer    ;
                         Polygon  : PLXtPolygon) : LxResult;
    function Mesh   (    Packet   : Pointer    ;
                     out VObj                  ) : LxResult;
    function Packet (    Vertex_  : PLXtPoint  ;
                         Polygon_ : PLXtPolygon;
                         Mesh_    : IUnknown   ) : Pointer ;
    function Item   (    Packet_  : Pointer    ;
                     out VObj                  ) : LxResult;
  end;

  ILxEdgePacketTranslation = interface
  [LXu_EDGEPACKETTRANSLATION]
    function Vertices(    Packet   : Pointer    ;
                          VertexA  : PLXtPoint  ;
                          VertexB  : PLXtPoint  ) : LxResult;
    function Polygon (    Packet   : Pointer    ;
                          Polygon  : PLXtPolygon) : LxResult;
    function Mesh    (    Packet   : Pointer    ;
                      out VObj                  ) : LxResult;
    function Packet  (    VertexA  : PLXtPoint  ;
                          VertexB  : PLXtPoint  ;
                          Polygon_ : PLXtPolygon;
                          Mesh_    : IUnknown   ) : Pointer ;
    function Item    (    Packet_  : Pointer    ;
                      out VObj                  ) : LxResult;
  end;

  ILxPolygonPacketTranslation = interface
  [LXu_POLYGONPACKETTRANSLATION]
    function Polygon(    Packet   : Pointer    ;
                         Polygon  : PLXtPolygon) : LxResult;
    function Mesh   (    Packet   : Pointer    ;
                     out VObj                  ) : LxResult;
    function Packet (    Polygon_ : PLXtPolygon;
                         Mesh_    : IUnknown   ) : Pointer ;
    function Item   (    Packet_  : Pointer    ;
                     out VObj                  ) : LxResult;
  end;

  ILxVMapPacketTranslation = interface
  [LXu_VMAPPACKETTRANSLATION]
    function Name  (      Packet : Pointer;
                    const Name   : PPChar ) : LxResult;
    function &Type (      Packet : Pointer;
                          &Type  : PLXtID4) : LxResult;
    function Packet(      Type_  : LXtID4 ;
                    const Name_  : PChar  ) : Pointer ;
  end;

function LXiSEL_ACTION       : LXtID4;  // Action
function LXiSEL_ITEM         : LXtID4;  // Item
function LXiSEL_VERTEX       : LXtID4;  // Vertex (Point)
function LXiSEL_POLYGON      : LXtID4;  // Polygon
function LXiSEL_MODIFIER     : LXtID4;  // Modifier
function LXiSEL_CHANNEL      : LXtID4;  // Channel
function LXiSEL_CINEMA       : LXtID4;  // Cinema
function LXiSEL_PARTICLE     : LXtID4;  // Particle
function LXiSEL_ENVELOPE     : LXtID4;  // Envelope
function LXiSEL_ENVELOPE_KEY : LXtID4;  // Envelope Keyframe
function LXiSEL_GRADIENT_KEY : LXtID4;  // Gradient Keyframe
function LXiSEL_EDGE         : LXtID4;  // Mesh Edge
function LXiSEL_VMAP         : LXtID4;  // Vertex Map
function LXiSEL_PTAG         : LXtID4;  // Polygon Tag
function LXiSEL_PIVOT        : LXtID4;  // Pivot
function LXiSEL_CENTER       : LXtID4;  // Center
function LXiSEL_LINK         : LXtID4;  // Link

implementation

function LXiSEL_ACTION       : LXtID4; inline;
begin
  Result := LXxID4('A','C','T','I');
end;
function LXiSEL_ITEM         : LXtID4; inline;
begin
  Result := LXxID4('I','T','E','M');
end;
function LXiSEL_VERTEX       : LXtID4; inline;
begin
  Result := LXxID4('V','E','R','X');
end;
function LXiSEL_POLYGON      : LXtID4; inline;
begin
  Result := LXxID4('P','O','L','Y');
end;
function LXiSEL_MODIFIER     : LXtID4; inline;
begin
  Result := LXxID4('M','O','D','S');
end;
function LXiSEL_CHANNEL      : LXtID4; inline;
begin
  Result := LXxID4('C','H','A','N');
end;
function LXiSEL_CINEMA       : LXtID4; inline;
begin
  Result := LXxID4('C','I','N','E');
end;
function LXiSEL_PARTICLE     : LXtID4; inline;
begin
  Result := LXxID4('P','T','C','L');
end;
function LXiSEL_ENVELOPE     : LXtID4; inline;
begin
  Result := LXxID4('E','N','V','L');
end;
function LXiSEL_ENVELOPE_KEY : LXtID4; inline;
begin
  Result := LXxID4('E','K','E','Y');
end;
function LXiSEL_GRADIENT_KEY : LXtID4; inline;
begin
  Result := LXxID4('G','K','E','Y');
end;
function LXiSEL_EDGE         : LXtID4; inline;
begin
  Result := LXxID4('E','D','G','E');
end;
function LXiSEL_VMAP         : LXtID4; inline;
begin
  Result := LXxID4('V','M','A','P');
end;
function LXiSEL_PTAG         : LXtID4; inline;
begin
  Result := LXxID4('P','T','A','G');
end;
function LXiSEL_PIVOT        : LXtID4; inline;
begin
  Result := LXxID4('P','I','V','T');
end;
function LXiSEL_CENTER       : LXtID4; inline;
begin
  Result := LXxID4('C','N','T','R');
end;
function LXiSEL_LINK         : LXtID4; inline;
begin
  Result := LXxID4('L','I','N','K');
end;

end.

